(尤指编程语言标准中的术语)未指定行为:标准允许存在多种可能的结果或实现方式,但不要求实现必须选择哪一种;同一程序在不同编译器、平台、优化级别下可能表现不同,但仍不算违反标准。
/ˌʌnspəˈsaɪfɪd bɪˈheɪvjər/
The order of evaluation here can lead to unspecified behavior.
这里的求值顺序可能导致未指定行为。
In C and C++, relying on unspecified behavior may make your program behave differently across compilers, even if it seems to “work” during testing.
在 C 和 C++ 中,依赖未指定行为可能让你的程序在不同编译器之间表现不一致,即使它在测试中看起来“能用”。
unspecified 来自 *un-*(否定前缀)+ specified(被明确说明的),表示“未被明确规定的”;behavior 表示“行为、表现”。合在一起用于标准/规范语境,指“规范没有把结果固定下来”。